package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhHelpsMapper;
import com.ruoyi.xh.domain.XhHelps;
import com.ruoyi.xh.service.IXhHelpsService;

/**
 * 帮助说明Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhHelpsServiceImpl extends ServiceImpl<XhHelpsMapper,XhHelps> implements IXhHelpsService {

    /**
     * 查询帮助说明
     * 
     * @param id 帮助说明主键
     * @return 帮助说明
     */
    @Override
    public XhHelps selectXhHelpsById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询帮助说明列表
     * 
     * @param xhHelps 帮助说明
     * @return 帮助说明
     */
    @Override
    public Page<XhHelps> selectXhHelpsList(XhHelps xhHelps)
    {
        return new Page<>();
    }

    /**
     * 新增帮助说明
     * 
     * @param xhHelps 帮助说明
     *
     */
    @Override
    public void insertXhHelps(XhHelps xhHelps)
    {
        this.save(xhHelps);
    }

    /**
     * 修改帮助说明
     * 
     * @param xhHelps 帮助说明
     *
     */
    @Override
    public void updateXhHelps(XhHelps xhHelps)
    {
        this.updateById(xhHelps);
    }

    /**
     * 批量删除帮助说明
     * 
     * @param ids 需要删除的帮助说明主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhHelpsByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
